﻿using CefSharp;
using CefSharp.Handler;
using Common.Util;

namespace pinduoduo.CefHandler
{
    public class ProxyAuthRequestHandler : RequestHandler
    {

        protected override bool GetAuthCredentials(IWebBrowser chromiumWebBrowser, IBrowser browser, string originUrl, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback)
        {
            if (isProxy)
            {
                callback.Continue(RestClientUtil.UserName, RestClientUtil.Password);
                return true;
            }
            return false;
        }
    }
}
